<template>
  <div>
    <ul>
      <li><router-link to="/c/bb">BB</router-link></li>
      <li><router-link to="/c/cc">CC</router-link></li>
      <li><router-link to="/c/dd">DD</router-link></li>
    </ul>
    <button @click="clickBtn()">点我点我点我点我</button>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ["BB", "CC", "DD"],
    };
  },
  methods: {
    clickBtn() {
      let random = Math.floor(Math.random() * 3);
      console.log(random);

      this.$router.push({
        name: this.list[random],
      });
    },
  },
};
</script>

<style></style>
